var api = require('./api/api.js');

App({
    onLaunch: function () {
        this.checkLogin();
    },
    globalData: {
        userInfo: {
            nickName: 'Hi，游客',
            username: '点击去登录',
            avatarUrl: 'http://yanxuan.nosdn.127.net/8945ae63d940cc42406c3f67019c5cb6.png'
        },
        token: '',
        isLogin: false
    },
    checkLogin() {
        api.checkLogin().then((res) => {
            this.globalData.isLogin = true;
        });
    }
})